<template>
    <div class="infoTitle" ref="UI">
        <div class="beforeline"></div>
        <div class="tit">{{ title }}</div>
    </div>
</template>

<script>
export default {
    props: {
        title: {
            typeof: String,
            default: "标题"
        },
        marginBottom: {
            typeof: String,
            default: '28px'
        }

    },
    data() {
        return {

        }
    },
    methods: {
        setUI() {
            this.$refs.UI.style.setProperty('--marginBottom', this.marginBottom) // 给变量赋值
        }
    },
    mounted() {
        this.setUI()
    }

}
</script>

<style lang="scss" scoped>
.infoTitle {
    background-color: #f8f8f8;
    height: 40px;
    display: flex;
    align-items: center;
    margin-bottom: var(--marginBottom);

    .beforeline {
        height: 14px;
        width: 3px;
        display: inline-block;
        background-color: #1890ff;
        margin-left: 12px;
        margin-right: 6px;
    }

    >.tit {
        color: #262626;
        font-size: 13px;
        font-weight: bold;
    }
}
</style>